<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:p="http://primefaces.org/ui">


	<h:head><h1>Wishlist Utente</h1>
	    <style type="text/css">
        .ui-layout-unit{
             border: none;
        }
    </style>
				<link type="text/css" href="./generalstyle.css" rel="stylesheet"/>
	
	</h:head>
<body>
	<img src="http://upload.wikimedia.org/wikipedia/it/thumb/e/ee/GenioAladdin.JPG/250px-GenioAladdin.JPG" alt="" height="200" width="300"/>
 <h:form>
        <p:menubar>  
                <p:menuitem value="Home" url="./home.xhtml" />  
				<p:menuitem value="Area Cliente" url="./cliente/homeCliente.xhtml" />
				<p:menuitem value="Area Impiegato" url="./impiegato/homeImpiegato.xhtml" /> 
				<p:menuitem value="Login" url="./login.xhtml" rendered="#{request.remoteUser == null}" />
                <p:menuitem value="Logout" actionListener="#{logoutManagedBean.logout()}" rendered="#{request.remoteUser != null}" />
		</p:menubar>
		</h:form>

	
				<ui:repeat value="#{UtenteManagedBean.pacchetti}" var="packCorr"
			varStatus="statoPack">
		<h:form>
			<p:layout style=" height:100px;">
				<p:layoutUnit position="center">
					<p:layout style="height:50px;" >
						<p:layoutUnit position="west" size="200">
							<p:outputLabel value="Nome Pacchetto: " />
							<p></p>
							<p:outputLabel value="Numero Persone: " />
						</p:layoutUnit>
						<p:layoutUnit position="center">
							<p:outputLabel id="nome" value="#{packCorr.nome}" />
							<p></p>
							<p:outputLabel id="numeroPersone" value="#{packCorr.numeroPersone}"/>
						</p:layoutUnit>
					</p:layout>
				</p:layoutUnit>
				<p:layoutUnit position="east" size="600">
									<p:commandButton value="Offri"
						actionListener="#{WishlistManagedBean.storeNbuy(UtenteManagedBean.pacchetti.get(statoPack.index).idPacchetto,UtenteManagedBean.idWishlist)}"
						ajax="false" />
				</p:layoutUnit>
			</p:layout>
		</h:form>
	</ui:repeat>

</body>
</html>